package com.lc.utils;

import com.lc.pojo.UmsUser;

/**
 * 线程变量工具类
 */
public class ThreadVariablesUtil {

    public static ThreadLocal<UmsUser> threadLocal = new ThreadLocal<>();

    public static void setThreadData(UmsUser umsUser) {
        threadLocal.set(umsUser);
    }

    public static UmsUser getThreadData() {
        return threadLocal.get();
    }

    public static void removeThreadData() {
        threadLocal.remove();
    }

}
